<%@ page contentType="text/html; charset=utf-8" language="java"%>
<%@ include file="/jsp/common/index.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
    <title>修改菜单</title>
		<%@ include file="/jsp/common/js.jsp"%>
		<%@ include file="/jsp/common/css.jsp"%>
		<base target="_self">
		<script language="javascript">
		<!--
		function dataInsertOrUpdate()
		   {
		       if(getlength(g("vo.menuName").value)<1)
		       {
		           alert("请输入名称");
		           return;
		       }
		       if(getlength(g("vo.menuCode").value)<1)
		       {
		           alert("请输入编码");
		           return;
		       }
		       if(g("menuleaf").checked && getlength(g("vo.url").value)<1)
		       {
		           alert("请输入链接");
		           return;
		       }
		       g("form").submit();
		   }
		   function changeData(){
			   if(g("menuleaf").checked){
			   		g("vo.menuleaf").value=1;
			   }else{
				   g("vo.menuleaf").value=0;
			   }
		   }
		-->
		</script>
	</head>

	<body class="cbody">
		<%@ include file="/jsp/page/pagehead.jsp"%>
		<br/>
		<s:form id="form"  action="update" theme="simple">  
		<s:hidden name="vo.id" id="vo.id"></s:hidden>
		<table width="90%" border="0" cellpadding="0" cellspacing="0" class="inputarea" align="center">
		<thead>
		    <tr class="detailrow">
		       <td class="tleft" colspan="3">&nbsp;更新菜单</td>
		    </tr>
		</thead>
		
		  <tr class="detailrow">
				<td class="tright" width="15%">
					菜单名称&nbsp;
				</td>
				<td class="tleft" width="50%">
					<s:textfield label="菜单名称：" name="vo.menuName" id="vo.menuName" maxlength= "50"  theme="simple" cssClass="largeinput"/>
				</td>
				<td class="tleft">
				   &nbsp;最长25个汉字
				</td>
			</tr>
			<tr class="detailrow">
				<td class="tright" width="15%">
					菜单编码&nbsp;
				</td>
				<td class="tleft" width="50%">
					<s:textfield label="菜单编码：" name="vo.menuCode" id="vo.menuCode" maxlength= "18"  theme="simple" cssClass="largeinput"/>
				</td>
				<td class="tleft">
				   &nbsp;
				</td>
			</tr>
			<tr class="detailrow">
				<td class="tright" width="15%">
					相关模块&nbsp;
				</td>
				<td class="tleft" width="50%">
					<s:select label="相关模块：" id="vo.moduleId" emptyOption="true" labelposition="top" theme="simple"  multiple="false" listKey="id" listValue="name" name="vo.moduleId" list="moduleList"></s:select>
				</td>
				<td class="tleft">
				   &nbsp;
				</td>
			</tr>
			<tr class="detailrow">
				<td class="tright" width="15%">
					页节点&nbsp;
				</td>
				<td class="tleft" width="50%">
					<input type="checkbox" id="menuleaf" name="menuleaf" <s:if test='vo.menuleaf == "1"'>checked="checked"</s:if> onclick="changeData();" >
					<s:hidden id="vo.menuleaf" name="vo.menuleaf"></s:hidden>
				</td>
				<td class="tleft">
				   &nbsp;
				</td>
			</tr>
			<tr class="detailrow">
				<td class="tright" width="15%">
					访问链接&nbsp;
				</td>
				<td class="tleft" width="50%">
					<s:textfield label="访问链接：" name="vo.url" id="vo.url" maxlength= "50"  theme="simple" cssClass="largeinput"/>
				</td>
				<td class="tleft">
				   &nbsp;
				</td>
			</tr>
			
			<tr>
			    <td>
			       &nbsp;
			    </td>
				<td class="tcenter">
					<input type="button" class="wbt" value="保存" id="UpdateButton" onclick="dataInsertOrUpdate();"/>
					&nbsp;&nbsp;
					<input type="button" class="wbt" value="列表" id="listButton" onclick="window.location='beforeSelect.htm';"/>
				</td>
				<td>
				   &nbsp;
				</td>
			</tr>

            <tr>
				<td cospan="3" class="tcenter">
					&nbsp;
				</td>
			</tr>
 
		</table>
        </s:form>



		<%@ include file="/jsp/page/foot.jsp"%>
	</body>
</html>

